<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body>
        <script>
            let p = new Promise((resolve, reject) => {
                resolve("Yes");
            });

            let result = p.then((v) => {
                //1. 抛出错误
                // throw '出问题啦!!';
                //2. 返回结果 不是一个 promise 对象
                // return 521;
                //3. 返回的是 promise 对象
                return new Promise((resolve, reject) => {
                    // resolve('Yes');
                    reject('No');
                });
            }, r => {
                console.log(r);
            });

            console.log(result);
        </script>
    </body>
</html>
